/*
 * @Author: funlee 
 * @Email: i@funlee.cn 
 * @Date: 2017-12-11 15:27:31 
 * @Last Modified time:   2017-12-11 15:27:31 
 * @Description: 定制地图logo
 */
import ol from 'openlayers'
import 'openlayers/dist/ol.css'
import logo from '../../img/logo.png'

export default () => {
  new ol.Map({
    controls: ol.control.defaults({
      attributionOptions: ({
        collapsible: false
      })
    }),
    // logo: false,     // 不显示logo
    // logo: 'face_monkey.png',     // 用一个图片 face_monkey.png 作为logo
    logo: {
      src: logo,
      href: 'http://www.openstreetmap.org/'
    }, // 点击能跳转到对应页面
    layers: [
      new ol.layer.Tile({
        source: new ol.source.OSM()
      })
    ],
    view: new ol.View({
      center: [13078573.75444912, 4800741.73727404],
      zoom: 2
    }),
    target: 'map'
  });
}